#pragma once

#include "complex_types.h"
typedef cplxf data_t;
typedef float filt_t;

void plan_wavelet (int &nc, int &lf,  int &L, int *&S,
                   float *&lor, float *&hir, float *&lod, float *&hid,
                   cplxf *X, int m, int n);

void destroy_wavelet (float *lor, int *S);


void forward_wavelet (data_t *c, int nc,
                        data_t *x, int m, int n,
                        int L, int *S,
                        filt_t const *lod, filt_t const *hid, int lf);
void cu_inverse_wavelet (data_t *X, int m, int n,
                    data_t *C, int nc, 
                    int L, int *S, filt_t const *lor, filt_t const *hir, int lf,
                    int batch);


void inverse_wavelet (data_t *x, int m, int n, 
                        data_t *c, int nc,
                        int L, int *S, 
                        filt_t const *lor, filt_t const *hir, int lf);

void cu_forward_wavelet (data_t *C, int nc, data_t *Y, int m, int n,
                    int L, int *S, filt_t const *lod, filt_t const *hid, int lf,
                    int batch);


int wavelet_sizes (int *& S, int m, int n, int L, int lf);

int get_wavelet_filters (filt_t *&);
